package singletonPattern.lazySingles;

public class SingletonPatternDemo {
    public static void main(String[] args) {
        //true
//        Singleton singleton1 = Singleton.getInstance();
//        Singleton singleton2 = Singleton.getInstance();

        //true
//        Singleton1 singleton1 = Singleton1.getInstance();
//        Singleton1 singleton2 = Singleton1.getInstance();

        //true
//        Singleton2 singleton1 = Singleton2.getInstance();
//        Singleton2 singleton2 = Singleton2.getInstance();

        //true
        Singleton3 singleton1 = Singleton3.getInstance();
        Singleton3 singleton2 = Singleton3.getInstance();

        System.out.println(singleton1 == singleton2);
    }
}
